package com.uidp.ui;

import com.acsior.sbc.exception.BusinessException;
import com.acsior.sbc.exception.SearchException;
import com.acsior.wu.bean.MBGeneralCriteriaSearch;
import com.acsior.wu.request.RequestManager;
import com.uidp.domain.Modul;
import com.uidp.search.ModulSearch;
import com.uidp.uitils.ManagedBeans;
import com.uidp.uitils.NavOutcomes;

public class MBSearchModul extends MBGeneralCriteriaSearch<ModulSearch, Modul>{
	
	private String modulname;

	public MBSearchModul() {
		super(ModulSearch.class);
	}
	
	

	@Override
	protected void specificSearch() throws SearchException, BusinessException {
		setTableRows(Modul.searchModuls(getModulname()));
		
	}
	
	public String navToEdit(){
		Modul m = getTableRows().get(getSelectedRow());
		RequestManager.putInRequest(ManagedBeans.regModul, m);
		return navigate(NavOutcomes.modul);
	}

	@Override
	public void initData() {
		// TODO Auto-generated method stub
		
	}

	
	/**
	 * @see MBGeneral#getManagedProp()
	 */
	protected ManagedBeans getManagedProp() {
		return ManagedBeans.searchModul;
	}



	public String getModulname() {
		return modulname;
	}



	public void setModulname(String modulname) {
		this.modulname = modulname;
	}

	

}
